From 6f688921d58f0afac49642d6eb9051431fbf6a19 Mon Sep 17 00:00:00 2001 From: "smh22@boulderdash.cl.cam.ac.uk" Date: Mon, 17 Feb 2003 13:35:17 +0000 Subject: [PATCH] bitkeeper revision 1.64 (3e50e515H574gxTCkK8Frnaoka-RTA) fix horrendous complicated bug IAP couldn't. --- BitKeeper/etc/ignore | 2 ++ xen-2.4.16/drivers/block/xen_block.c | 4 ++++ xen-2.4.16/drivers/ide/ide-dma.c | 6 ++++++ xen-2.4.16/include/asm-i386/pci.h | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index 47b60ce0af..0b34c3a528 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -20,3 +20,5 @@ xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile.orig xenolinux-2.4.16-sparse/arch/xeno/drivers/block/block.c.orig xenolinux-2.4.16-sparse/scripts/kconfig.tk xen-2.4.16/foo +xen-2.4.16/common/domain.c.smh +URK diff --git a/xen-2.4.16/drivers/block/xen_block.c b/xen-2.4.16/drivers/block/xen_block.c index c61597e3d8..449eefe6a7 100644 --- a/xen-2.4.16/drivers/block/xen_block.c +++ b/xen-2.4.16/drivers/block/xen_block.c @@ -297,6 +297,10 @@ int dispatch_rw_block_io (int index) BUG(); } + if(blk_ring->btx_ring[index].buffer == NULL) { + printk(KERN_ALERT "xen_block: bogus buffer from guestOS\n"); + BUG(); + } if (XEN_BLK_DEBUG) { printk(XEN_BLK_DEBUG_LEVEL " btx_cons: %d btx_prod %d index: %d " diff --git a/xen-2.4.16/drivers/ide/ide-dma.c b/xen-2.4.16/drivers/ide/ide-dma.c index 4112e98850..6ce5fd4b1f 100644 --- a/xen-2.4.16/drivers/ide/ide-dma.c +++ b/xen-2.4.16/drivers/ide/ide-dma.c @@ -290,8 +290,14 @@ static int ide_build_sglist (ide_hwif_t *hwif, struct request *rq) sge->page = bh->b_page; sge->offset = bh_offset(bh); } else { + + +#if 0 + /* below is wrong for xen since b_data is actually + a 'physical / virtual' thingy. Ask KAF. */ if (((unsigned long) bh->b_data) < PAGE_SIZE) BUG(); +#endif sge->address = bh->b_data; } diff --git a/xen-2.4.16/include/asm-i386/pci.h b/xen-2.4.16/include/asm-i386/pci.h index 474cc9591a..1ffade8914 100644 --- a/xen-2.4.16/include/asm-i386/pci.h +++ b/xen-2.4.16/include/asm-i386/pci.h @@ -151,8 +151,12 @@ static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, for (i = 0; i < nents; i++ ) { if (sg[i].address && sg[i].page) out_of_line_bug(); + + /* not worth checking since NULL is ok says SMH */ +#if 0 else if (!sg[i].address && !sg[i].page) out_of_line_bug(); +#endif if (sg[i].address) sg[i].dma_address = virt_to_bus(sg[i].address); -- 2.30.2